import { Directive, OnInit, HostListener, ElementRef, Input } from '@angular/core';
import { NavController } from '@ionic/angular';

  @Directive({ selector: '[navBackButton]' })
  export class BackButtonDirective implements OnInit {
    constructor(public el: ElementRef, public navCtrl: NavController) {
      // pass
    }
    public ngOnInit() {
    }

    @HostListener('click', ['$event'])
    private clickEvent(event: MouseEvent) {
      this.navCtrl.pop();
      // this.navCtrl.back();
    }
  }
